//
//  BianJiViewController.m
//  UI_HLJ_Frame
//
//  Created by dlios on 15-7-1.
//  Copyright (c) 2015年 毕宏伟. All rights reserved.
//

#import "BianJiViewController.h"
#import "ZhuCeViewController.h"
#import "DengLuViewController.h"

#define WIDTH self.view.frame.size.width
#define HEIGHT self.view.frame.size.height

@interface BianJiViewController ()

@property(nonatomic ,retain)UIButton *button;
@property(nonatomic, retain)UIButton *buttonSF;

@end

@implementation BianJiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"登陆";
    [self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"登陆的背景图片"]]];
    
    // 三方登陆
    self.buttonSF = [UIButton buttonWithType:UIButtonTypeSystem];
    self.buttonSF.frame = CGRectMake(WIDTH * 0.7 / 2, HEIGHT * 1 / 3, WIDTH / 4, HEIGHT * 1.5 / 20);
    self.buttonSF.layer.borderWidth = 1;
    self.buttonSF.layer.cornerRadius = 10;
    [self.buttonSF setTitle:@"登陆" forState:UIControlStateNormal];
    self.buttonSF.backgroundColor = [UIColor colorWithRed:0.477 green:0.911 blue:1.000 alpha:0.950];
    [self.view addSubview:self.buttonSF];
    [self.buttonSF addTarget:self action:@selector(clickSF:) forControlEvents:UIControlEventTouchUpInside];
    
    // 注册
    self.button = [UIButton buttonWithType:UIButtonTypeSystem];
    self.button.frame = CGRectMake(WIDTH * 0.7 / 2, HEIGHT * 1.5 / 3, WIDTH / 4, HEIGHT * 1.5 / 20);
    self.button.layer.borderWidth = 1;
    self.button.layer.cornerRadius = 10;
    [self.button setTitle:@"注册" forState:UIControlStateNormal];
    self.button.backgroundColor = [UIColor colorWithRed:0.609 green:0.934 blue:1.000 alpha:0.930];
    [self.view addSubview:self.button];
    [self.button addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
    
    
    
}

// 注册的跳转
- (void)click:(UIButton *)button{
    
    ZhuCeViewController *zhuce = [[ZhuCeViewController alloc] init];
    [self.navigationController pushViewController:zhuce animated:YES];
    
}

// 登陆的跳转
- (void)clickSF:(UIButton *)button{
    
    DengLuViewController * denglu = [[DengLuViewController alloc] init];
    [self.navigationController pushViewController:denglu animated:YES];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
